package com.beans.userservice;

import com.beans.userrepository.UserRepository2;
import com.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Service //将当前bean对象存储到spring中
public class UserService2 {
    @Autowired
   private UserRepository2 userRepository2;
    public User getUser(){
        return userRepository2.getUser();
    }
}
